<?if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Planet Ilkom-ub
 *
 * Planet Ilkom-ub
 *
 * @package		Model Posting
 * @author		Ibnoe Daqiqil Id
 * @copyright	Copyright (c) 2008, www.ibnoe.web.id.
 * @link		http://www.ibnoe.web.id
 * @since		Version 1.0
 * @datetime    18-3-2008 12:33
 */
class Home extends Controller {

	var $page_num;
	function Home()
	{
		parent::Controller();
		$this->load->library('simplepie');
		$this->load->helper('debug');
		$this->load->helper('url');
		$this->load->model('mdl_posts','post');
		$this->load->model('mdl_site','site');
		$this->page->css_link("style.css");	
		$this->page_num = $this->uri->segment(3);
	}
	
	function index($page=0)
	{
		if (!$this->page_num) {
			$this->page_num = 1;
		}
		$this->post->page_num = $this->page_num;

		$data['result']		=$this->post->get();
		$data['site']=$this->site->get();
	 	$config['base_url'] = site_url('home/index');
		$config['total_rows'] = $this->post->numrows;
		$config['per_page'] = $this->post->limit;

		$this->pagination->initialize($config);
		$this->load->view('home',$data);
	}

}
?>